package site.fantasycube.demo;

import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import site.fantasycube.demo.service.TestDemo;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
    @Bean
    public ApplicationRunner runner(TestDemo testDemo){
        return args -> {
            //启动后需要执行的代码
            testDemo.testHttp();
        };
    }
}
